@import '../../../themes/mixins/buttons';
@import '../sidebarConfig';

.component {
  @include button;
  align-items: center;
  background-color: var(--theme-sidebar-menu-background-color);
  color: var(--theme-sidebar-menu-item-wallet-name-color);
  display: flex;
  flex-direction: row;
  height: $sidebar-button-height;
  justify-content: space-between;
  overflow: hidden;
  padding: 0 20px;
  position: relative;
  width: $sidebar-width - $sidebar-minimized-category-width;

  &:hover {
    background-color: var(--theme-sidebar-menu-item-background-color-hover);
  }

  &.legacyItem {
    .title {
      padding-right: 50px;
    }

    .meta {
      :global {
        .ProgressBar_component {
          width: 156px;
        }
      }
    }
  }

  &.notResponding {
    .meta {
      opacity: 0.5;
    }
  }

  &.notification {
    &:after {
      background: var(--theme-button-attention-background-color);
      border-radius: 50%;
      content: '';
      display: block;
      height: 8px;
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-8px);
      width: 8px;
    }
  }

  &.active {
    background-color: var(--theme-sidebar-menu-item-background-color-active);

    &:hover {
      background-color: var(--theme-sidebar-menu-item-background-color-active);
      cursor: default;
    }
  }

  .meta {
    display: flex;
    flex-direction: column;
    position: relative;
    text-align: left;
    width: 100%;

    :global {
      .ProgressBar_component {
        left: 0;
        margin-top: 6.5px;
        position: absolute;
        right: 0;
        top: 100%;
      }
    }

    .topContainer {
      align-items: center;
      display: flex;
      justify-content: space-between;

      .title {
        font-family: var(--font-regular);
        font-size: 18px;
        line-height: 1.5em;
        margin-top: -5.5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        .searchMatch {
          color: var(--theme-sidebar-menu-item-wallet-name-color);
        }

        .searchUnmatch {
          color: var(--theme-sidebar-menu-item-wallet-name-color);
          opacity: 0.7;
        }
      }

      .hardwareWalletsIconWrapper {
        flex: 1;
        margin-top: -5.5px;

        .hardwareWalletsIcon {
          svg {
            height: 14px;
            margin-left: 6px;
            width: 14px;

            path {
              fill: var(--theme-sidebar-menu-item-wallet-name-color);
            }
          }

          &.disconnected {
            svg {
              opacity: 0.3;
            }
          }
        }
      }
    }

    .info {
      color: var(--theme-sidebar-menu-item-wallet-info-color);
      font-family: var(--font-light);
      font-size: 14px;
      letter-spacing: 1px;
      opacity: 0.7;
    }
  }
}
